package com.wnxy.consumer;

import feign.Logger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

/**
 * @author yellow Doctor
 * @date 2025-03-21
 * @desc 蜗牛创想：www.woniuxy.com
 */

@EnableCircuitBreaker    // @SpringCloudApplication 也包含了熔断器组件开启
@EnableFeignClients("com.wnxy.feign.stu.api") //开启远程调用
@SpringBootApplication
@ComponentScan(
        value = {
                "com.wnxy.consumer",   // controller
                "com.wnxy.feign.stu.api"  // fallback
        }
)
public class StuConsumerApplication {

    public static void main(String[] args) {

        SpringApplication.run(StuConsumerApplication.class, args);

    }


    @Bean
    public Logger.Level loggerLevel() {
        return Logger.Level.FULL;
    }

}
